/*
 * @Author: your name
 * @Date: 2021-12-23 14:08:32
 * @LastEditTime: 2021-12-23 14:13:03
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \first_one_file\react-travel\src\components\productComments\ProductComments.ts
 */
import React from 'react';
import { Comment, Tooltip, List } from 'antd';

interface PropsType {
  data: {
    author: string;
    content: string;
    avatar: string;
    createDate: string;
  }[];
}

export const ProductComments: React.FC<PropsType> = ({data}) => {
  return (
    <List
    dataSource={data}
    itemLayout="horizontal"
    renderItem={(item) => (
      <li>
        <Comment
          author={item.author}
          avatar={item.avatar}
          content={item.content}
          datetime={item.createDate}
        />
      </li>
      )
    }
  ></List>
  );
}